﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="RanchBuddy.Web.Services.MyViewPage" %>
<%@ Import Namespace="System.Web.Mvc.Html"%>
<%@ Import Namespace="RanchBuddy.Web.Services"%>

<asp:Content ID="registerHead" ContentPlaceHolderID="head" runat="server">
    <title>Register</title>
</asp:Content>

<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Create a New Account</h2>
    <p>
        Use the form below to create a new account. 
    </p>
    <%= Html.ValidationSummary() %>

    <% using (Html.BeginForm()) { %>
    <%
        Random r = new Random();        
    %>
        <div>
            <fieldset class="lightbg">
                <legend>Fill in the fields to become a ranch buddy!</legend>
                <fieldset class="whitebg">
                    <legend>Account Information</legend>
                    This is so that you can access and interact with this site and its members.
                    <%= Html.TextBoxExWithHelp("Username","username",this.Page,22,r.Next()) %>
                    <%= Html.TextBoxExWithHelp("Email", "email", this.Page, 23, r.Next())%>
                    <%= Html.TextBoxExWithHelp("Password", "password", this.Page, 24, r.Next())%>
                    <%= Html.TextBoxExWithHelp("Confirm password", "confirmPassword", this.Page, 25, r.Next())%>
                    <%= Html.TextBoxExWithHelp("Secret Question", "secretQuestion", this.Page, 26, r.Next())%>
                    <%= Html.TextBoxExWithHelp("Secret Answer", "secretAnswer", this.Page, 28, r.Next())%>
                </fieldset>
                <p></p>
                <fieldset class="whitebg">
                    <legend>Profile Information</legend> 
                    Please be sure to provide us with an accurate zipcode as this information allows 
                    us to personalize what you see for you and your location.  You can add additional
                    information to your profile shortly.
                    <%= Html.TextBoxExWithHelp("First name", "firstName", this.Page, 27, r.Next())%>
                    <%= Html.TextBoxExWithHelp("Last name", "lastName", this.Page, 30, r.Next())%>
                    <%= Html.TextBoxExWithHelp("Zip code", "zipCode", this.Page, 31, r.Next())%>
                    <%= Html.TextBoxExWithHelp("Birth date", "birthDate", this.Page, 32, r.Next())%>
                    <%= Html.TextBoxExWithHelp("Website", "website", this.Page, 33, r.Next())%>
                </fieldset>
                <p></p>
                <fieldset class="whitebg">
                    <legend>Terms and Conditions</legend>
                    Please read through our terms and conditions.<br />
                    <%=Html.Hidden("termID",ViewData["TermID"].ToString()) %>
                    <%=Html.TextArea("terms",ViewData["Terms"].ToString(),4,40,new {@class=""}) %><br />
                    <label for="agreeWithTerms">Agree with terms?</label>
                    <%=Html.CheckBox("agreeWithTerms") %> <%=Html.Help(this.Page, 34, r.Next())%>
                </fieldset>
                <p></p>
                <fieldset class="whitebg">
                    <legend>Human Verification</legend>
                    <img id="captchaImage" name="captchaImage" src="/Captcha.aspx" />
                    <a href="#" onclick="document.captchaImage.src='/Captcha.aspx?'+Math.random();return false">Can't read image?</a>
                    <br />
                    Please enter the number you see above in the box below!<br />
                    <%=Html.TextBoxExWithHelp("CAPTCHA", "captcha", this.Page, 35, r.Next())%>
                </fieldset>
                <p></p>
                <p>
                    <input class="submit" type="submit" value="Register" />
                </p>
            </fieldset>
        </div>
    <% } %>
</asp:Content>
